<?php defined('BASE_PATH') or die('No direct script access.');
class Mlogin extends Model {
    public function index() {
        echo "da duet";
    }
    public function check($data) {
        $this->db->query("select * from ".DB_PREFIX."user
                        where email='".$data['user']."'
                            and password='".md5($data['pass'].'gialac')."'
                            and status=1 limit 1");
        return $this->db->affected();
    }

}
// End of class Mlogin
